package org.zjt.platform.springbootreactivedemo;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.reactive.config.EnableWebFlux;

@SpringBootApplication(scanBasePackages = {"org.zjt.platform.springbootreactivedemo"})
@Slf4j
@EnableWebFlux
@MapperScan("org.zjt.platform.springbootreactivedemo.repository")
public class SpringBootReactiveDemoApplication {

	public static void main(String[] args) {
		/*
		new SpringApplicationBuilder().sources(SpringBootReactiveDemoApplication.class)
				.bannerMode(Banner.Mode.LOG)
				.web(WebApplicationType.REACTIVE)
				.logStartupInfo(Boolean.TRUE)
				.banner((environment, sourceClass, out) -> out.println("------------printBanner----------------"))
				.listeners((ApplicationListener<ApplicationReadyEvent>) applicationReadyEvent -> log.info("listener:{}",applicationReadyEvent))
				.registerShutdownHook(Boolean.TRUE)
				.run(args);
		*/
		SpringApplication.run(SpringBootReactiveDemoApplication.class, args);
	}
}
